package com.feng.api.client.fallback;

import com.feng.api.client.OrderRemoteClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class UserRemoteClientFallbackFactory implements FallbackFactory<OrderRemoteClient> {
    @Override
    public OrderRemoteClient create(final Throwable cause) {
        log.error("UserRemoteClient回退：", cause);
        return new OrderRemoteClientFallback();
    }
}